package com.zoo.diannaopeijian.mapper;

import com.zoo.diannaopeijian.domain.SupplyChannel;
import com.zoo.diannaopeijian.domain.SupplyChannelExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface SupplyChannelMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @SelectProvider(type=SupplyChannelSqlProvider.class, method="countByExample")
    int countByExample(SupplyChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @DeleteProvider(type=SupplyChannelSqlProvider.class, method="deleteByExample")
    int deleteByExample(SupplyChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @Delete({
        "delete from supply_channel",
        "where SupplyChannelId = #{supplychannelid,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer supplychannelid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @Insert({
        "insert into supply_channel (SupplyChannelId, SupplyChannelName, ",
        "SupplyChannelNote)",
        "values (#{supplychannelid,jdbcType=INTEGER}, #{supplychannelname,jdbcType=VARCHAR}, ",
        "#{supplychannelnote,jdbcType=VARCHAR})"
    })
    int insert(SupplyChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @InsertProvider(type=SupplyChannelSqlProvider.class, method="insertSelective")
    int insertSelective(SupplyChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @SelectProvider(type=SupplyChannelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="SupplyChannelId", property="supplychannelid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SupplyChannelName", property="supplychannelname", jdbcType=JdbcType.VARCHAR),
        @Result(column="SupplyChannelNote", property="supplychannelnote", jdbcType=JdbcType.VARCHAR)
    })
    List<SupplyChannel> selectByExample(SupplyChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "SupplyChannelId, SupplyChannelName, SupplyChannelNote",
        "from supply_channel",
        "where SupplyChannelId = #{supplychannelid,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="SupplyChannelId", property="supplychannelid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="SupplyChannelName", property="supplychannelname", jdbcType=JdbcType.VARCHAR),
        @Result(column="SupplyChannelNote", property="supplychannelnote", jdbcType=JdbcType.VARCHAR)
    })
    SupplyChannel selectByPrimaryKey(Integer supplychannelid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @UpdateProvider(type=SupplyChannelSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") SupplyChannel record, @Param("example") SupplyChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @UpdateProvider(type=SupplyChannelSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") SupplyChannel record, @Param("example") SupplyChannelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @UpdateProvider(type=SupplyChannelSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(SupplyChannel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supply_channel
     *
     * @mbggenerated
     */
    @Update({
        "update supply_channel",
        "set SupplyChannelName = #{supplychannelname,jdbcType=VARCHAR},",
          "SupplyChannelNote = #{supplychannelnote,jdbcType=VARCHAR}",
        "where SupplyChannelId = #{supplychannelid,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(SupplyChannel record);
}